#define PC
#include <stdio.h>
#include <plateConf.h>

void tesGetterSetter();

int main() {
    printf("\n\n--------------\n");
    printf("plateConfTest\n");
    
    tesGetterSetter();    
    
    return 0;
}

void tesGetterSetter() {
    int res = 1;
    
    printf("tesGetterSetter: ");
    
    
    plateConf pConf1,pConf2;
    
    initPlateConf(&pConf1);
    initPlateConf(&pConf2);
    
    //printPlateConf(pConf1);
    
    if (isPConfEqual(pConf1,pConf2) == 0){res = 0;}
    
    setAbsis(&pConf1,1);
    setOrdinat(&pConf1,2);
    setTargetTemp(&pConf1,3);
    setActTemp(&pConf1,4);
    setBgTemp(&pConf1,5);
    setKp(&pConf1,6);
    setKi(&pConf1,7);
    setKd(&pConf1,8);
    
    if (isPConfEqual(pConf1,pConf2) == 1){res = 0;}
    
    setAbsis(&pConf2,1);
    setOrdinat(&pConf2,2);
    setTargetTemp(&pConf2,3);
    setActTemp(&pConf2,4);
    setBgTemp(&pConf2,5);
    setKp(&pConf2,6);
    setKi(&pConf2,7);
    setKd(&pConf2,8);
    
    if (isPConfEqual(pConf1,pConf2) == 0){res = 0;}
    
    printf("%s\n", res?"SUCCESS":"FAILED");
    
}
